﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace TestProject_asp
{
    public partial class showtable : System.Web.UI.Page
    {
        DBConnection.DBConnection conn;
        protected void Page_Load(object sender, EventArgs e)
        {
            
                try
                {
                    Response.Write(Request.Form["server"]);
                    conn = new DBConnection.DBConnection(Request.Form["txtServer"], Request.Form["txtUsername"], Request.Form["txtPassword"], Request.Form["txtDatabasename"]);
                    System.Data.DataTable message_table = conn.sp_ExecReader("dbo.sp_getmessage", "message");
                    GridView1.DataSource = message_table;
                    DataBind();
                }
                catch (Exception ex)
                {
                   // Response.Write("<script language='javascript'>alert('connection infomation is wrong..!')</script>");    
                    Response.Write(ex);
                }
            
        }
 

         

    }
}
